package com.neusoft.chenhanhua.ChineseChess;

public class ChessRule {

	public boolean zhoux(int x1,int y1,int x2,int y2, int i,String[] names,int [] xs,int [] ys) {
		String cheming=names[i];
		switch (cheming) {
		case "che":
			Che che =new Che();
			return che.che(x1, y1, x2, y2, i,xs,ys);
		case "ma":
			Ma ma=new Ma();
			return ma.ma(x1, y1, x2, y2, i,xs,ys);
		case "xiang":
			Xing xing =new Xing();
			return xing.xing(x1, y1, x2, y2, i,xs,ys);
		case "shi":
			Shi shi=new Shi();
			return shi.shi(x1, y1, x2, y2, i,xs,ys);
		case "boss":
			Boss boss =new Boss();
			return boss.boss(x1, y1, x2, y2, i,xs,ys);
		case "pao":
			Pao pao=new Pao();
			return pao.pao(x1, y1, x2, y2, i,xs,ys);
		case "bing":
			Bing bing=new Bing();
			return bing.bing(x1, y1, x2, y2, i,xs,ys);
		default:
			break;
		}
		return false;
	}
}
